package com.my.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("family_person")
//家谱人物类
public class Person {
  @TableId(value = "person_id", type = IdType.AUTO)
  private Integer personId;
  private Integer familyArchiveId;
  private String lastName;
  private String firstName;
  private Integer fatherId;
  private String mother;
  private String childType;
  private String seniority;
  private String mainIntroduction;
  private Integer ranking;
  private String name;


  public Person(Integer familyArchiveId, String lastName, String firstName, Integer fatherId, String mother, String childType, String seniority, String mainIntroduction, Integer ranking) {
    this.familyArchiveId = familyArchiveId;
    this.lastName = lastName;
    this.firstName = firstName;
    this.fatherId = fatherId;
    this.mother = mother;
    this.childType = childType;
    this.seniority = seniority;
    this.mainIntroduction = mainIntroduction;
    this.ranking = ranking;
    this.name = lastName + firstName;
  }
}
